Skip to main content

Excel Root

AutomatR.Excel.ExcelRoot

The "Excel Root" activity in AutomatR is a fundamental component of the Excel activities package, serving as a scope for Excel activities. This activity opens an Excel workbook, providing a context for executing various Excel-related operations within the specified workbook and sheet.

Properties

NameDescription
Input
Excel PathEnter the full path of the workbook on the local drive, including the filename (e.g., "C:\excelActivities\workbook.xlsx"). String variables containing the path.
In WorkbookEnter the workbook variable for storing the information of Excel captured from the Excel path file.
Sheet NameEnter the name of the spreadsheet to be used and referred to in scope Excel activities. String variables containing the sheet name.
Misc
Display NameThe display name of the activity. A display name is automatically generated when you indicate a target.
Result
Optional
Display ExcelWhen set to true, the Excel file will be displayed, and operations performed on it will be visible. Boolean variables indicating whether to display Excel.
DelaySpecifies the amount of time (in seconds) to wait before executing the "Excel Root" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
PasswordEnter the password for the workbook if required. String variables containing the password.
Output
WorkbookEnter the workbook variable for storing the entire information of Excel, which has been captured from the Excel path file and can be used for other Excel activities.

When the execution of this activity ends, the specified workbook and the Excel application are closed. If a WorkbookApplication variable is provided in the Output > Workbook property field, the spreadsheet is not closed after the activity ends. If the specified file does not exist, a new Excel file is created.

How to use:

  1. Drag and drop the "Excel Root" activity onto the workflow.
  2. Configure the properties by specifying the Excel path, sheet name, and other optional parameters.
  3. Optionally, configure the delay.
  4. Optionally, set the "Display Excel" property to true if visualizing Excel operations is required.
  5. Execute the workflow to open the specified Excel workbook and create a scope for Excel activities.

Example: Consider an example where the "Excel Root" activity is used to open an Excel workbook located at "C:\Data\workbook.xlsx" with a sheet named "Sheet1":

Excel Root:
Excel Path: "C:\Data\workbook.xlsx"
Sheet Name: "Sheet1"
Password: "password123"
Delay: 2
Display Excel: true
In Workbook: workbookVariable
Workbook: excelWorkbook

In this example, the activity opens the specified Excel workbook, sets the sheet to "Sheet1," and provides the workbook variable "workbookVariable" for storing information. The entire Excel workbook is also stored in the "excelWorkbook" variable for use in subsequent Excel activities.